import { MyRequestOptions,HttpResponse } from './type';
import request from '@/utils/api/request';

export const myStoreDetail = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/myStoreDetail`;
  return request.get(option);
};

export const industryList = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/industryList`;
  return request.get(option);
};

export const applyStore = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/applyStore`;
  return request.post(option);
};

export const updateLicence = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/updateLicence`;
  return request.post(option);
};

export const storeBondInfo = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/storeBondInfo`;
  return request.get(option);
};

export const pageBondRecord = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/pageBondRecord`;
  return request.get(option);
};

export const rechargeBond = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/rechargeBond`;
  return request.post(option);
};

export const updateWorkTime = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/updateWorkTime`;
  return request.post(option);
};

export const pageStoreAuditRecords = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/pageStoreAuditRecords`;
  return request.get(option);
};

export const auditDetail = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/auditDetail`;
  return request.get(option);
};

export const queryReviewsByRefId = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/product/queryReviewsByRefId`;
  return request.get(option);
};
export const authRealName = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/authRealName`;
  return request.post(option);
};

export const ocrCertNo = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/ocrCertNo`;
  return request.get(option);
};

export const closeStore = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/closeStore`;
  return request.post(option);
};

export const applyWithdraw = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/rechargeOrWithdraw/applyWithdraw`;
  return request.post(option);
};
export const verifyOrder = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/order/verifyOrder`;
  return request.post(option);
};

export const alertPay = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/order/alertPay`;
  return request.get(option);
};
